import {createRouter, createWebHistory} from "vue-router";
import LoginView from "../views/LoginView.vue";
import IndexVue from "../views/IndexVue.vue";
import UserView from "../views/user/UserView.vue";
import ActivityView from "../views/activity/ActivityView.vue";
import UserDetailsView from "../views/user/UserDetailsView.vue";
import UserAddOrUpdateView from "../views/user/UserAddOrUpdateView.vue";
import ClueView from "../views/clue/ClueView.vue";
import CustomerView from "../views/customer/CustomerView.vue";
import ActivityrAddOrUpdateView from "../views/activity/ActivityrAddOrUpdateView.vue";
import ActivityDetailsView from "../views/activity/ActivityDetailsView.vue";
import ClueAddOrUpdateView from "../views/clue/ClueAddOrUpdateView.vue";
import RoleVue from "../views/role/RoleVue.vue";
import ClueDetailsView from "../views/clue/ClueDetailsView.vue";
import StatisticsView from "../views/statistics/StatisticsView.vue";
import TranVue from "../views/tran/TranVue.vue";
import TranAddOrUpdateView from "../views/tran/TranAddOrUpdateView.vue";



export const router =  createRouter({
    history: createWebHistory(),
    routes:[

        {
            path: '/',
            component : LoginView,
        },
        {
            path: '/index',
            component : IndexVue,
            children:[
                {
                    path: '',
                    component : StatisticsView
                },
                {
                    path: 'user',
                    component : UserView
                },
                {
                    path: 'user/details/:id',
                    component : UserDetailsView
                },
                {
                    path: 'user/edit/:id',
                    component : UserAddOrUpdateView
                },
                {
                    path: 'user/add',
                    component : UserAddOrUpdateView
                },
                {
                    path: 'activity',
                    component : ActivityView
                },
                {
                    path: 'activity/add',
                    component : ActivityrAddOrUpdateView
                },
                {
                    path: 'activity/edit/:id',
                    component : ActivityrAddOrUpdateView
                },
                {
                    path: 'activity/details/:id',
                    component : ActivityDetailsView
                },
                {
                    path: 'clue',
                    component : ClueView
                },
                {
                    path: 'clue/add',
                    component : ClueAddOrUpdateView
                },
                {
                    path: 'clue/edit/:id',
                    component : ClueAddOrUpdateView
                },
                {
                    path: 'clue/details/:id',
                    component : ClueDetailsView
                },
                {
                    path: 'customer',
                    component : CustomerView
                },
                {
                    path: 'role',
                    component : RoleVue
                },
                {
                    path: 'tran',
                    component : TranVue
                },
                {
                    path: 'tran/add',
                    component : TranAddOrUpdateView
                },
                {
                    path: 'tran/details/:id',
                    component : TranAddOrUpdateView
                },
            ]
        },
    ]
})